﻿<phone:PhoneApplicationPage 
    x:Class="OnlineVideos.Views.ScoreBoard"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False" Loaded="PhoneApplicationPage_Loaded">
    <Grid x:Name="mainGrid" Background="{StaticResource bipivot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="80"/>
        </Grid.RowDefinitions>
        <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
      <phone:Pivot x:Name="pvtScoreBoard" SelectionChanged="pvtScoreBoard_SelectionChanged">
        <phone:Pivot.Title>
                <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
                    <Image x:Name="imgTitle" Style="{StaticResource DetailPagePivotTitleImage}"  HorizontalAlignment="Left" MouseLeftButtonDown="imgTitle_MouseLeftButtonDown"/>

                    <TextBlock x:Name="tblkVideosTitle" Style="{StaticResource DetailPagePivotTitle}"  TextWrapping="NoWrap"/>
                </StackPanel>
            </phone:Pivot.Title>
        <phone:Pivot.Foreground>
                white
            </phone:Pivot.Foreground>
            <!--Pivot item one-->
        <phone:PivotItem>
          <phone:PivotItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock x:Name="tblkATeamBat" FontSize="58"></TextBlock>
                        <Image Source="/Images/bat-ball.png" Height="49" Width="49" Margin="15,10,0,0"></Image>
                    </StackPanel>
                </phone:PivotItem.Header>
                <ScrollViewer>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <StackPanel Orientation="Horizontal" Grid.Row="0">
                            <TextBlock x:Name="tblkAinnings" Width="300" Foreground="AntiqueWhite" FontSize="30"/>
                            <TextBlock x:Name="tblkTeamAbatting" Text="R(B)" Margin="85,0,0,0" Foreground="AntiqueWhite" FontSize="30" Visibility="Collapsed"/>
                        </StackPanel>
                        <ListBox x:Name="lbxteamA" Grid.Row="1" Margin="0,20,0,0" ScrollViewer.VerticalScrollBarVisibility="Disabled" Foreground="White">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <Grid Height="90">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="210"/>
                                            <ColumnDefinition Width="125"/>
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Grid.Column="0" Text="{Binding PlayerName}" FontSize="24"/>
                                        <TextBlock Grid.Column="1" Text="{Binding Out}" FontSize="22" TextWrapping="Wrap" Margin="-10,0,0,0"/>
                                        <StackPanel Orientation="Horizontal" Grid.Column="2" Margin="37,0,0,0">
                                            <TextBlock  Text="{Binding Runs}" FontSize="24"/>
                                            <TextBlock  Text="{Binding Balls}" FontSize="24"/>
                                        </StackPanel>
                                    </Grid>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>
                        <StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0,10,0,20">
                            <TextBlock x:Name="tblkAExtas" Text="Extras : " FontSize="30" Foreground="AntiqueWhite" Visibility="Collapsed" />
                            <TextBlock x:Name="tblkExtras" FontSize="28" TextWrapping="Wrap" Width="360" Foreground="AntiqueWhite"/>
                        </StackPanel>

                        <StackPanel Orientation="Horizontal" Grid.Row="3" Margin="0,0,0,20">
                            <TextBlock x:Name="tblkATotal" Text="Total : " FontSize="30" Foreground="AntiqueWhite" Visibility="Collapsed"/>
                            <TextBlock x:Name="tblkTotal" FontSize="28" TextWrapping="Wrap" Width="360" Foreground="AntiqueWhite"/>
                        </StackPanel>
                    </Grid>
                </ScrollViewer>
            </phone:PivotItem>

            <!--Pivot item two-->
        <phone:PivotItem>
          <phone:PivotItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock x:Name="tblkBTeamBowl" FontSize="58"></TextBlock>
                        <Image Source="/Images/Cktbal.png" Height="49" Width="49" Margin="15,10,0,0"></Image>
                    </StackPanel>
                </phone:PivotItem.Header>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="60"/>
                        <RowDefinition Height="365"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal" Grid.Row="0">
                        <TextBlock Text="Bowler" Margin="0,0,150,0" FontSize="30" Foreground="AntiqueWhite"/>
                        <TextBlock Text=" O   M    R   W" FontSize="30" Foreground="AntiqueWhite"/>
                    </StackPanel>

                    <ListBox x:Name="lbxteamBbowling" Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Disabled" Foreground="White">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid Height="40">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="220"/>
                                        <ColumnDefinition Width="60"/>
                                        <ColumnDefinition Width="55"/>
                                        <ColumnDefinition Width="50"/>
                                        <ColumnDefinition Width="40"/>
                                        <ColumnDefinition Width="100"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding PlayerName}" FontSize="24" Margin="0,0,0,0"/>
                                    <TextBlock Grid.Column="1" Text="{Binding Overs}" FontSize="24"  Margin="30,0,0,0"/>
                                    <TextBlock Grid.Column="2" Text="{Binding Maidens}" FontSize="24" Margin="28,0,0,0"/>
                                    <TextBlock Grid.Column="3" Text="{Binding Runs}" FontSize="24" Margin="25,0,0,0"/>
                                        <TextBlock Grid.Column="4" Text="{Binding Wickets}" FontSize="24" Margin="25,0,0,0"/>
                                    <!--<TextBlock Grid.Column="5" Text="{Binding tbEconomy}" FontSize="24" Margin="30,0,0,0"/>-->
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <StackPanel Name="adstackp1" Grid.Row="2" Orientation="Vertical"  Margin="-4,100,0,0">
                    </StackPanel>
                </Grid>
            </phone:PivotItem>

            <!--Pivot item three-->
        <phone:PivotItem>
          <phone:PivotItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock x:Name="tblkBTeamBat" FontSize="58"></TextBlock>
                        <Image Source="/Images/bat-ball.png" Height="49" Width="49" Margin="15,10,0,0"></Image>
                    </StackPanel>
                </phone:PivotItem.Header>
                <ScrollViewer>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <StackPanel Orientation="Horizontal" Grid.Row="0">
                            <TextBlock x:Name="tblkBinnings" Width="300" Foreground="AntiqueWhite" FontSize="30"/>
                            <TextBlock Text="R(B)" Foreground="AntiqueWhite" FontSize="30" Margin="85,0,0,0"/>
                        </StackPanel>
                        <ListBox x:Name="lbxteamB" Grid.Row="1" Margin="0,20,0,0" ScrollViewer.VerticalScrollBarVisibility="Disabled" Foreground="White">
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <Grid Height="90">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="210"/>
                                            <ColumnDefinition Width="125"/>
                                            <ColumnDefinition Width="*"/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Grid.Column="0" x:Name="txtblk" Text="{Binding PlayerName}" FontSize="24"/>
                                        <TextBlock Grid.Column="1" x:Name="txtblk1" Text="{Binding Out}" FontSize="22" TextWrapping="Wrap" Margin="-20,0,10,0"/>
                                        <StackPanel Orientation="Horizontal" Grid.Column="2" Margin="37,0,0,0">
                                            <TextBlock  Text="{Binding Runs}" FontSize="24"/>
                                            <TextBlock  Text="{Binding Balls}" FontSize="24"/>
                                        </StackPanel>
                                    </Grid>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>

                        <StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0,0,0,20">
                            <TextBlock Text="Extras : " FontSize="30" Foreground="AntiqueWhite"/>
                            <TextBlock x:Name="txblkExtras"  FontSize="28" TextWrapping="Wrap" Width="360" Foreground="AntiqueWhite"/>
                        </StackPanel>

                        <StackPanel Orientation="Horizontal" Grid.Row="3" Margin="0,0,0,20">
                            <TextBlock Text="Total : " FontSize="30" Foreground="White"/>
                            <TextBlock x:Name="txblkTotal" FontSize="28" TextWrapping="Wrap" Width="360" Foreground="AntiqueWhite"/>
                        </StackPanel>

                    </Grid>
                </ScrollViewer>
            </phone:PivotItem>

            <!--Pivot item four-->
        <phone:PivotItem>
          <phone:PivotItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock x:Name="tblkATeamBowl" FontSize="58"></TextBlock>
                        <Image Source="/Images/Cktbal.png" Height="49" Width="49" Margin="15,10,0,0"></Image>
                    </StackPanel>
                </phone:PivotItem.Header>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="60"/>
                        <RowDefinition Height="365"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal" Grid.Row="0">
                        <TextBlock Text="Bowler" Margin="0,0,150,0" FontSize="30" Foreground="AntiqueWhite"/>
                        <TextBlock Text=" O   M    R   W" FontSize="30" Foreground="AntiqueWhite"/>
                    </StackPanel>

                    <ListBox x:Name="lbxteamAbowling" Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Disabled" Foreground="White">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid Height="40">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="220"/>
                                        <ColumnDefinition Width="60"/>
                                        <ColumnDefinition Width="55"/>
                                        <ColumnDefinition Width="50"/>
                                        <ColumnDefinition Width="40"/>
                                        <ColumnDefinition Width="100"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding PlayerName}" FontSize="24" Margin="0,0,0,0"/>
                                    <TextBlock Grid.Column="1" Text="{Binding Overs}" FontSize="24"  Margin="30,0,0,0"/>
                                    <TextBlock Grid.Column="2" Text="{Binding Maidens}" FontSize="24" Margin="28,0,0,0"/>
                                    <TextBlock Grid.Column="3" Text="{Binding Runs}" FontSize="24" Margin="25,0,0,0"/>
                                        <TextBlock Grid.Column="4" Text="{Binding Wickets}" FontSize="24" Margin="25,0,0,0"/>
                                    <!--<TextBlock Grid.Column="5" Text="{Binding taEconomy}" FontSize="24" Margin="30,0,0,0"/>-->
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <!--<StackPanel Name="adstackp2" Grid.Row="2" Orientation="Vertical"  Margin="-4,100,0,0">
                    </StackPanel>-->
                </Grid>
            </phone:PivotItem>
        </phone:Pivot>
            <toolkit:PerformanceProgressBar
            VerticalAlignment="Top"
            x:Name="performanceProgressBar"/>
        
        
        </Grid>
        <StackPanel Name="adstaCast" Grid.Row="1" Orientation="Vertical" Margin="-4,10,0,0" >
        </StackPanel>
    </Grid>
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>